Optimal. Leaf size=56 \[ -\frac {a}{2 x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)}{2 x^2}+\frac {1}{2} a^2 \text {PolyLog}(2,-a x)-\frac {1}{2} a^2 \text {PolyLog}(2,a x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {6161, 6037,
331, 212, 6031} \begin {gather*} \frac {1}{2} a^2 \text {Li}_2(-a x)-\frac {1}{2} a^2 \text {Li}_2(a x)+\frac {1}{2} a^2 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)}{2 x^2}-\frac {a}{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 331
Rule 6031
Rule 6037
Rule 6161
Rubi steps
\begin {align*} \int \frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{x^3} \, dx &=-\left (a^2 \int \frac {\tanh ^{-1}(a x)}{x} \, dx\right )+\int \frac {\tanh ^{-1}(a x)}{x^3} \, dx\\ &=-\frac {\tanh ^{-1}(a x)}{2 x^2}+\frac {1}{2} a^2 \text {Li}_2(-a x)-\frac {1}{2} a^2 \text {Li}_2(a x)+\frac {1}{2} a \int \frac {1}{x^2 \left (1-a^2 x^2\right )} \, dx\\ &=-\frac {a}{2 x}-\frac {\tanh ^{-1}(a x)}{2 x^2}+\frac {1}{2} a^2 \text {Li}_2(-a x)-\frac {1}{2} a^2 \text {Li}_2(a x)+\frac {1}{2} a^3 \int \frac {1}{1-a^2 x^2} \, dx\\ &=-\frac {a}{2 x}+\frac {1}{2} a^2 \tanh ^{-1}(a x)-\frac {\tanh ^{-1}(a x)}{2 x^2}+\frac {1}{2} a^2 \text {Li}_2(-a x)-\frac {1}{2} a^2 \text {Li}_2(a x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 68, normalized size = 1.21 \begin {gather*} -\frac {a}{2 x}-\frac {\tanh ^{-1}(a x)}{2 x^2}-\frac {1}{4} a^2 \log (1-a x)+\frac {1}{4} a^2 \log (1+a x)-\frac {1}{2} a^2 (-\text {PolyLog}(2,-a x)+\text {PolyLog}(2,a x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 78, normalized size = 1.39
method | result | size |
derivativedivides | \(a^{2} \left (-\arctanh \left (a x \right ) \ln \left (a x \right )-\frac {\arctanh \left (a x \right )}{2 a^{2} x^{2}}-\frac {\ln \left (a x -1\right )}{4}+\frac {\ln \left (a x +1\right )}{4}-\frac {1}{2 a x}+\frac {\dilog \left (a x +1\right )}{2}+\frac {\ln \left (a x \right ) \ln \left (a x +1\right )}{2}+\frac {\dilog \left (a x \right )}{2}\right )\) | \(78\) |
default | \(a^{2} \left (-\arctanh \left (a x \right ) \ln \left (a x \right )-\frac {\arctanh \left (a x \right )}{2 a^{2} x^{2}}-\frac {\ln \left (a x -1\right )}{4}+\frac {\ln \left (a x +1\right )}{4}-\frac {1}{2 a x}+\frac {\dilog \left (a x +1\right )}{2}+\frac {\ln \left (a x \right ) \ln \left (a x +1\right )}{2}+\frac {\dilog \left (a x \right )}{2}\right )\) | \(78\) |
risch | \(-\frac {a}{2 x}+\frac {a^{2} \ln \left (-a x \right )}{4}-\frac {a^{2} \ln \left (-a x +1\right )}{4}+\frac {\ln \left (-a x +1\right )}{4 x^{2}}-\frac {a^{2} \dilog \left (-a x +1\right )}{2}-\frac {a^{2} \ln \left (a x \right )}{4}+\frac {a^{2} \ln \left (a x +1\right )}{4}-\frac {\ln \left (a x +1\right )}{4 x^{2}}+\frac {a^{2} \dilog \left (a x +1\right )}{2}\) | \(96\) |
meijerg | \(\frac {i a^{2} \left (\frac {2 i}{x a}+\frac {2 i \left (-a x +1\right ) \left (a x +1\right ) \arctanh \left (a x \right )}{x^{2} a^{2}}\right )}{4}+\frac {i a^{2} \left (\frac {2 i a x \polylog \left (2, \sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}-\frac {2 i a x \polylog \left (2, -\sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}\right )}{4}\) | \(101\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 81, normalized size = 1.45 \begin {gather*} \frac {1}{4} \, {\left (2 \, {\left (\log \left (a x + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-a x\right )\right )} a - 2 \, {\left (\log \left (-a x + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (a x\right )\right )} a + a \log \left (a x + 1\right ) - a \log \left (a x - 1\right ) - \frac {2}{x}\right )} a - \frac {1}{2} \, {\left (a^{2} \log \left (x^{2}\right ) + \frac {1}{x^{2}}\right )} \operatorname {artanh}\left (a x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \left (- \frac {\operatorname {atanh}{\left (a x \right )}}{x^{3}}\right )\, dx - \int \frac {a^{2} \operatorname {atanh}{\left (a x \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 330 vs.
\(2 (44) = 88\).
time = 1.31, size = 330, normalized size = 5.89 \begin {gather*} a^{2} {\left (\frac {\log \left (\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}}\right )}{a} - \frac {\log \left ({\left | \frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 1 \right |}\right )}{a} + \frac {\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 2}{a {\left (\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 1\right )}} - \frac {2 \, \log \left (-\frac {\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{a - \frac {a {\left (\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} + 1\right )}}{\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} - 1}} - 1}{\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{a - \frac {a {\left (\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} + 1\right )}}{\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} - 1}} + 1}\right )}{a {\left (\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 1\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} -\int \frac {\mathrm {atanh}\left (a\,x\right )\,\left (a^2\,x^2-1\right )}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________